package nc.bs.pub.action;

import nc.bs.common.projectFAUtils;
import nc.bs.framework.common.NCLocator;
import nc.bs.pub.compiler.AbstractCompiler2;
import nc.itf.pu.m422x.IStoreReqAppApprove;
import nc.vo.pu.m422x.entity.StoreReqAppVO;
import nc.vo.pub.BusinessException;
import nc.vo.pub.compiler.PfParameterVO;
import nc.vo.uap.pf.PFBusinessException;

public class N_422X_UNAPPROVE extends AbstractCompiler2 {
	public String getCodeRemark() {
		return "\tObject retValue = null;\nnc.vo.pu.m422x.entity.StoreReqAppVO[] inObject = (nc.vo.pu.m422x.entity.StoreReqAppVO[])getVos();\nretValue = nc.bs.framework.common.NCLocator.getInstance().lookup(nc.itf.pu.m422x.IStoreReqAppApprove.class).unapprove(inObject, this);\nreturn retValue;\n";
	}

	public Object runComClass(PfParameterVO vo) throws BusinessException {
		try {
			super.m_tmpVo = vo;
			Object retValue = null;
			StoreReqAppVO[] inObject = (StoreReqAppVO[]) ((StoreReqAppVO[]) this.getVos());
			
			//lhw 231124 保存前校验项目Ŀ begin
			new projectFAUtils().projectDataApprove("po_storereq", inObject, "unsave");
			//end
			
			retValue = ((IStoreReqAppApprove) NCLocator.getInstance().lookup(IStoreReqAppApprove.class))
					.unapprove(inObject, this);
			return retValue;
		} catch (Exception var4) {
			if (var4 instanceof BusinessException) {
				throw (BusinessException) var4;
			} else {
				throw new PFBusinessException(var4.getMessage(), var4);
			}
		}
	}
}